<template>
  <div class="employees-container">
    <div class="app-container">
      <el-card>
        <el-tabs v-model="currSel">
          <el-tab-pane name="succerr" label="登录账户设置">
            <Loginsetting :user-detail="userDetail"></Loginsetting>
          </el-tab-pane>
          <el-tab-pane label="个人详情" name="detail">
            <UserInfo :user-detail="userDetail"></UserInfo>
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import { getUserDetailById } from '@/api/user'
import UserInfo from './components/user-info'
import Loginsetting from './components/login-setting'
export default {
  components: {
    UserInfo,
    Loginsetting
  },
  data () {
    return {
      userDetail: {},
      currSel: 'detail'
    }
  },
  created () {
    this.getUserDetail()
  },
  methods: {
    async getUserDetail () {
      const res = await getUserDetailById(this.$route.params.id)
      this.userDetail = res
    }
  }

}
</script>

<style lang="scss" scoped>
</style>
